/**
 * Sample React Native App
 * https://github.com/facebook/react-native
 *
 * @format
 * @flow strict-local
 */
import React from 'react';
import MainStack from './src/routes/MainStack';
import {Provider} from 'react-redux';
import store from './src/store';
import Loading from './src/components/Loading';
import Toast from './src/components/Toast';
import {NativeBaseProvider} from 'native-base/src/core/NativeBaseProvider';
import {StatusBar} from 'react-native';

const App = () => {
  return (
    <Provider store={store}>
      <NativeBaseProvider>
        <StatusBar barStyle={'light-content'} translucent={true} />
        <MainStack />
        <Loading ref={node => (global.Loading = node)} />
        <Toast ref={node => (global.Toast = node)} />
      </NativeBaseProvider>
    </Provider>
  );
};

export default App;
